<template>
	<view class="content bgGray">
		<z-paging ref="paging" v-model="dataList" @query="queryList">
			<view
				class="flex-r bgWhite jsb p16 ver-c"
				style="border-bottom: 1rpx solid #eee"
				v-for="item of dataList"
				:key="item.tCommodityid"
			>
				<view class="flex-r ver-c jsb" style="width: 100%">
					<view class="f1 flex-r ver-c wrap fs14">
						<view class="flex-r jsb" style="width: 100%">
							<view class="f1">
								浏览内容：
								<text class="gray">{{ item.tBrowsecontent }}</text>
							</view>
							<view>
								浏览人：
								<text class="gray">{{ item.tMembername }}</text>
							</view>
						</view>
						<view class="mt10" style="width: 100%">
							访问时间：
							<text class="gray">{{ item.tBrowsetime }}</text>
						</view>
						<view class="mt10">
							联系方式：
							<text class="gray">{{ item.tPhone }}</text>
						</view>
					</view>
				</view>
			</view>
		</z-paging>
	</view>
</template>

<script>
import { ImgIP } from '@/utils/comm.js'
import Utils from '@/utils/utils.js'
import { getVisitorList } from '@/api/mine.js'
export default {
	data() {
		return {
			tMerchantid: '',
			dataList: []
		}
	},
	onShow() {},
	onLoad(option) {
		//this.getList()
		this.tMerchantid = option.tMerchantid
	},
	onUnload() {},
	methods: {
		// getStatusClass(status) {
		// 	if (status == 1) return 'yellow'
		// 	if (status == 2) return 'green'
		// 	return 'red'
		// },
		// getImgUrl(image) {
		// 	if (image == '') {
		// 		return 'https://www.helloimg.com/i/2024/09/06/66dac3200f428.png'
		// 	} else {
		// 		let imageArr = image.split(',')
		// 		let images = imageArr[0]
		// 		return ImgIP + images
		// 	}
		// },
		queryList(pageNo, pageSize) {
			getVisitorList(pageNo, pageSize, this.tMerchantid).then(
				(res) => {
					console.log(res)
					this.$refs.paging.complete(res.rows)
				},
				(err) => {
					this.$refs.paging.complete(false)
				}
			)
		}
	}
}
</script>

<style lang="stylus" scoped>
.content
	min-height 100%
.btn1
	font-size 26rpx
	background #c40414
	border-radius 20rpx
	color #fff
	padding 6rpx 16rpx
.btn2
	font-size 26rpx
	border 1rpx solid #c40414
	border-radius 20rpx
	color #c40414
	padding 6rpx 16rpx
</style>
